//
//  UIColor+Extension.swift
//  SwiftExercise
//
//  Created by 罗宗庆 on 2021/6/23.
//

import Foundation

extension UIColor{
    //        self.init(red: <#T##CGFloat#>, green: <#T##CGFloat#>, blue: <#T##CGFloat#>, alpha: <#T##CGFloat#>)
    convenience init(r: CGFloat, g: CGFloat, b: CGFloat, alpha: CGFloat = 1.0) {
        self.init(displayP3Red: r / 255.0, green: g / 255.0, blue: b / 255.0, alpha: alpha)
    }
    
    class func globalBackGroundColor()->UIColor {
        return UIColor(displayP3Red: 240, green: 243, blue: 243, alpha: 1)
    }
    
    class func mainColor()->UIColor{
        return UIColor(displayP3Red: 123, green: 240, blue: 143, alpha: 1)
    }
}
